home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Linux
/
Kubuntu 8.10
/
kubuntu-8.10-desktop-i386.iso
/
casper
/
filesystem.squashfs
/
usr
/
share
/
doc
/
base-files
/
remove-base
< prev
Wrap
Text File
|
2008-10-20
|
641b
|
22 lines
#!/bin/sh
set -e
rm -f /var/lib/dpkg/base.*
cd /var/lib/dpkg
if grep -q "^Package: base$" status; then
cp status status.bak
awk '
$0 == "Package: base" { state=1 }
state != 1 { print $0 }
state == 1 && $0 == "" { state=2 }
' status > status.new
mv status.new status
echo "Done."
echo
echo "The /var/lib/dpkg/status file has been modified to remove references to"
echo "the \`base' package, and all the /var/lib/dpkg/base.* files have been"
echo "removed. The file \`status.bak' contains a backup of the old \`status'"
echo "file, in case something went wrong."
else
echo "Not changing \`status' file since it does not seem to list base."
fi